home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.4 KB | 56 lines | [TEXT/GEOL] |
- Item 3297077 21-Dec-89 13:16
-
- From: CDA0004 VAR Shana Enterprises, Don Murphy
-
- To: D5369 Mgmt Sys Des, Chuck McMath,PRT
- MACAPP.TECH$ MacApp Technical
-
- Sub: Re-Associating Two Files
-
- Attn: Mgmt Sys Des, Chuck McMath,PRT
- Attn: MacApp Technical
- SentBy: Wayne Malkin
- Date 12/21/89
- Subject Re-Associating Two Files
- From Wayne Malkin
- To Mgmt Sys Des, Chuck McMath,PRT
- CC MacApp Technical
-
- Reply to: Re-Associating Two Files
- Chuck,
-
- You are correct that the information you should store is volume name,
- directory id, and file name.
-
- By the way, the volume name can be a Str27 and the file name can be a Str31.
- Str255 is over kill.
-
- To get the vRefNum from the volume name, call PBGetVInfo:
-
- VAR
- pb : ParamBlockRec;
- theName : Str255;
-
- WITH pb DO
- BEGIN
- theName := CONCAT (volName,':');
- ioNamePtr := @theName;
- ioVRefNum := 0;
- ioVolIndex := -1;
- END;
- FailOSErr (PBGetVInfo (@pb,FALSE));
- vRefNum := pb.ioVRefNum;
-
-
- This returns the volume ref num (which is for the volume, not the directory
- you want). I have previously just used PBHOpen at this point to open the file
- based on its name and directory id. I think this is the right way to do it,
- but if you need a working directory refnum to pass to another routine, you can
- call PBOpenWD to open the working directory (IM IV-158).
-
- Regards,
-
- Wayne Malkin
-
-
-